package com.jwds.digital.bios.business.core.infrastructure.mapper.belt;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwds.digital.bios.business.core.infrastructure.dto.belt.BeltRouteTaskDetailReqDTO;
import com.jwds.digital.bios.business.core.infrastructure.entity.belt.BeltRouteTaskDetail;
import com.jwds.digital.bios.business.core.infrastructure.vo.belt.BeltAnomalyInfoRespVO;
import com.jwds.digital.bios.business.core.infrastructure.vo.belt.BeltDayTargetHisRespVO;
import com.jwds.digital.bios.business.core.infrastructure.vo.belt.BeltRouteTaskDetailRespVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 路线作业实绩详情表 Mapper 接口
 *
 * @author 林柏云
 * @date 2024-11-28
 */
@Mapper
public interface BeltRouteTaskDetailMapper extends BaseMapper<BeltRouteTaskDetail> {

  /**
   * 分页查询
   * @param page 分页参数
   * @param condition 查询条件
   * @return respVOList 查询结果
   */
  IPage<BeltRouteTaskDetailRespVO> pageQuery(@Param("page") Page<?> page, @Param("condition") BeltRouteTaskDetailReqDTO condition);

  /**
  * 列表查询
  * @param condition 查询条件
  * @return respVOList 查询结果
  */
  List<BeltRouteTaskDetailRespVO> queryList(@Param("condition") BeltRouteTaskDetailReqDTO condition);

  /**
  * 根据ID查询
  * @param id 查询条件
  * @return respVO 查询结果
  */
  BeltRouteTaskDetailRespVO queryById(@Param("id") Long id);

    /*******************扩展查询*******************/
  /**
   * 获取当前时间最新数据
   * @param time 当前时间的开始时间
   * @return 当前最新数据信息
   */
  List<BeltRouteTaskDetailRespVO> getHomeData(@Param("time") Date time);

  BeltDayTargetHisRespVO lineHistoryInformation(@Param("beginOfDay") Date beginOfDay);

  List<BeltAnomalyInfoRespVO> alarmMessage();
}
